#pragma once
#include <GLES2/gl2.h>




typedef void (GL_APIENTRY *pglTexImage2D)(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels);
typedef void (GL_APIENTRY *pglTexSubImage2D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels);
typedef void (GL_APIENTRY *pglBindTexture)(GLenum target, GLuint texture);
typedef void (GL_APIENTRY *pglDeleteTextures)(GLsizei n, const GLuint* textures);

typedef void (GL_APIENTRY *pglCompressedTexImage2D)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *data);
typedef void (GL_APIENTRY *pglCompressedTexSubImage2D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data);

void HookApi();
void UnhookApi();


void GL_APIENTRY glTexImage2D_new(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels);
void GL_APIENTRY glTexSubImage2D_new(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels);
void GL_APIENTRY glBindTexture_new(GLenum target, GLuint texture);
void GL_APIENTRY glDeleteTextures_new(GLsizei n, const GLuint* textures);

void GL_APIENTRY glCompressedTexImage2D_new(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *data);
void GL_APIENTRY glCompressedTexSubImage2D_new(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data);
